<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>逻辑运算符</title>
</head>

<body>
    <script>
        // 1.逻辑与 && and 两侧都为true 结果就为true,只要有一个false 结果就为false
        console.log(3 > 5 && 3 > 2); //false
        console.log(3 < 5 && 3 > 2); //true

        // 2.逻辑或 || or 两侧都为false 结果就为false,只要有一个true 结果就为true
        console.log(3 > 5 || 3 > 2); //true
        console.log(3 < 5 || 3 > 2); //false

        // 3.逻辑非 not !
        console.log(!false); // true
        console.log(!true); // false
    </script>
</body>

</html>